package adv5;

import java.util.Scanner;

public class TestStudent {

	public static void main(String[] args) {
		Student s = new Student("小青蛇", 1000, Sex.妖);
		System.out.println(s.getSex().ordinal());
		System.out.println(s);
		Scanner sc = new Scanner(System.in);
		System.out.println("换一个性别：");
		String s2 = sc.next();
		s.setSex(Sex.valueOf(s2));
		System.out.println(s);
		System.out.println("性别是：" + s.getSex().name());
	}

}
